package work.mediway.mdm.biz.service.biz;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import work.mediway.mdm.core.page.QueryRequest;
import work.mediway.mdm.biz.dto.biz.DictEditLogDTO;
import work.mediway.mdm.biz.dto.biz.PatientEditLogDTO;
import work.mediway.mdm.biz.entity.biz.MdmEditLog;
import work.mediway.mdm.biz.vo.biz.DictEditLogVO;
import work.mediway.mdm.biz.vo.biz.PatientEditLogVO;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2021/1/28
 */
public interface MdmEditLogService extends IService<MdmEditLog> {

    /**
     * 获取字典变动日志
     *
     * @param editLogDTO   DictEditLogDTO
     * @param queryRequest QueryRequest
     * @return Page<DictEditLogVO>
     */
    Page<DictEditLogVO> listDictChangeLog(DictEditLogDTO editLogDTO, QueryRequest queryRequest);

    /**
     * 获取主数据患者变动日志
     *
     * @param editLogDTO   PatientEditLogDTO
     * @param queryRequest QueryRequest
     * @return Page<PatientEditLogVO>
     */
    Page<PatientEditLogVO> listPatientChangeLog(PatientEditLogDTO editLogDTO, QueryRequest queryRequest);

    /**
     * 查找最新的一条数据
     *
     * @param tableCode 表名
     * @param id        表内rowId
     * @return MdmEditLog
     */
    MdmEditLog findOneLastedByTableRowId(String tableCode, String id);
}
